//
//  DesktopIconView.m
//  llang
//
//  Created by Artur Gurgul on 11-10-25.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import "DesktopIconView.h"

@implementation DesktopIconView

@synthesize imageView;
@synthesize textLabel;

@synthesize button;


- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        float textSize = 11;
        
        imageView = [[UIImageView alloc] initWithFrame:CGRectMake(textSize, 0, frame.size.width -  2*textSize, frame.size.width -  2*textSize)];
        
        [self addSubview:imageView];
        
        
        button = [UIButton buttonWithType:UIButtonTypeCustom];
        button.frame = CGRectMake(0, 0, frame.size.width, frame.size.height);
        [self addSubview:button];
        
        
        textLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, floor(frame.size.width - 2*textSize), floor(frame.size.width), 2*textSize)];
        textLabel.numberOfLines = 2;
        textLabel.font = [UIFont boldSystemFontOfSize:textSize];
        textLabel.textAlignment = UITextAlignmentCenter;
        [self addSubview:textLabel];
        
        
        
    }
    return self;
}

@end
